﻿@using System.Configuration
@using MVCMongo.Services
@model IEnumerable<DataMongo.Entities.FeedPost>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutProfile.cshtml";
    var configUrl = ConfigurationManager.AppSettings["ImageLinkUrl"];
}

<div class="container-fluid">
    <div class="row-fluid">
        <div class="span9">
            @foreach (var item in Model.OrderByDescending(x=>x.PublishDate))
            {
                var imageUrl = configUrl + item.ImageURL1;
            <div class="row-fluid">
                <div class="blog-list-post small">
                    <div class="preview-img span3">
                        <a href="more-blog-post.html"><img src="@imageUrl" /></a>
                    </div>
                    <div class="post-content span9">
                        <h4 class="post-title">
                            <a href="@Url.RouteUrl("ViewFeed", new { id = item.FeedPostId, title = UtilityService.RemoveSpecialCharacters(item.Title) })" target="_blank">@item.Title</a>
                        </h4>
                        <div class="post-meta">
                            <span class="date">
                                <i class="icon-calendar"></i> @item.PublishDate.Substring(0,16)
                            </span>
                            <span class="comments">
                                <i class="icon-comments"></i> <a href="#">5 comments</a>
                            </span>
                            <span class="tags">
                                <i class="icon-tag"></i>
                                <a href="#">ui</a>
                                <a href="#">flat</a>
                                <a href="#">clean</a>
                            </span>
                            <span class="author">
                                <i class="icon-user"></i> <a href="#">eakroko</a>
                            </span>
                        </div>
                        <div class="post-text">
                            <p>@Html.Raw(item.ShortDescription)</p>
                        </div>
                    </div>
                </div>
            </div>  }
            @*<div class="box">

                <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto">
                    <div data-visible="true" data-start="bottom" class="box-content nopadding " style="overflow: hidden; width: auto;">
                        <ul class="messages">
                            @foreach (var item in Model)
                            {
                                <li class="left">
                                    
                                    <div class="image">
                                        <img src="~/Content/UserProfile/img/NoImage.jpg" />
                                    </div>
                                    <div class="message">
                                        <span class="caret"></span>
                                        <span class="name">@item.ShortDescription</span>
                                        <p>@item.FullDescription</p>

                                        <span>
                                            <a class="btn btn-mini content-refresh" href="#"><i class="icon-thumbs-up"></i><small>Like</small></a>
                                        </span>
                                        <span>
                                            <a class="btn btn-mini content-refresh" href="#"><i class=""></i><small>Comment</small></a>
                                        </span>
                                        <span>
                                            <a class="btn btn-mini content-refresh" href="#"><i class=""></i><small>Share</small></a>
                                        </span>      <span class="time">
                                                         12 minutes ago
                                                     </span>
                                    </div>
                                </li>

                            }




                        </ul>

                    </div><div class="slimScrollBar ui-draggable" style="background: none repeat scroll 0% 0% rgb(102, 102, 102); width: 7px; position: absolute; top: 100px; opacity: 0.4; display: block; border-radius: 7px; z-index: 99; right: 1px; height: 247.295px;"></div><div class="slimScrollRail" style="width: 7px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 7px; background: none repeat scroll 0% 0% rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px;"></div>
                </div>
            </div>*@
        </div>
       
        <div class="span3">
            @Html.Action("FriendList")

        </div>

    </div>
</div>


<script type="text/javascript">
    $(document).ready(function() {
        var list = document.querySelectorAll(".jumpTag");
        var list = document.querySelectorAll(".jumpTag");
        $.each(list, function() {
            $(this).remove();
        });
    });
</script>